﻿@model List<InfoHit>
@{
    ViewBag.Title = "命中信息";
}

@{
    ViewBag.CurrentMenu = "InfoHit";
}


<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-header with-border">
                <div id="title">
                    <a href="@Url.Action("GetWebsiteTypeNews", "InfoHit")" , new { style="float:left;padding-right:10px;font-size:medium;color:red;" }>命中信息</a>
                    <a href="@Url.Action("GetWebsiteTypeNewsForOneHour", "InfoHit")" , new { style="float:left;padding-right:10px;font-size:medium;color:red;" }>近一小时</a>
                    <a href="@Url.Action("GetNewsForDyKeyword", "InfoHit", new { num = 20 })" , new { style="float:left;padding-right:10px;font-size:medium;color:red;" }>重点地域</a>
                </div>
            </div>
            <div class="box-body">
                <div class="table-scrollable">

                    <table>
                        <tr>
                            <td>
                                @foreach (var w in ViewBag.websiteTypeList)
            {
                var itemlist = Model.FindAll(a => a.WebsiteTypeId == w.Id).ToList();
                //如果信息数量大于0，则是显示，否则不显示
                if (itemlist.Count > 0)
                {
                                        <div style="float: left;padding-right:10px;">
                                            <h3>@w.WebsiteTypeName<span><a href="@Url.Action("GetWebsiteNews", "InfoHit", new { WebsiteTypeId = @w.Id })" , new { style="float:right;padding-right:10px;font-size:medium;" }>更多>></a></span></h3>
                                            <ul>
                                                @foreach (var item in itemlist)
                                                {
                                                    <li>
                                                        <span style=" float:right;">&nbsp;&nbsp;@item.CreatedOn.ToString("MM/dd HH:mm")</span>
                                                        <a href="@item.Url" target="_blank" title="网站：@item.WebsiteId &#10;栏目：@item.BigclassId &#10;标题：@item.Title &#10;内容：@item.Summary &#10;命中关键字：@item.Keyword">@(@item.Title.ToString().Length > 20 ? @item.Title.ToString().Substring(0, 20) + "..." : @item.Title)</a>
                                                    </li>
                                                }
                                            </ul>
                                        </div>
                                    }
                                    else
                                    {
                                        continue;
                                    }
                                }
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>  